package com.itheima.hutool;

import cn.hutool.core.io.FileUtil;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class HuToolDemo1 {
    public static void main(String[] args) {
        //hutool包

        File java = FileUtil.file("D:\\", "Java", "aaa.txt");
        //FileUtil.touch(FileUtil.file("D:", "Java", "aaa.txt"));

        ArrayList<String> list = new ArrayList<>();
        list.add("Hello World");
        list.add("Hello World");
        list.add("Hello World");
        FileUtil.writeLines(list,java,"utf-8");

        List<String> strings = FileUtil.readLines("D:\\Java\\aaa.txt", "utf-8");
        System.out.println(strings);
    }
}
